package edu.lnu.ums.entities;

import javax.persistence.Column;
import javax.persistence.Entity;

import edu.lnu.ums.entities.core.UMSObject;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Unit extends UMSObject {
    private static final long serialVersionUID = 1L;
    
    @ManyToOne(cascade = {CascadeType.PERSIST})
    @JoinColumn
    private Worker boss;

    @Column
    private String location;

    @Column
    private String fullName;

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public Worker getBoss() {
        return boss;
    }

    public void setBoss(Worker boss) {
        this.boss = boss;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }
}
